home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 June
/
EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso
/
earcd
/
gcc
/
ixemlsrc.lha
/
ixemul
/
ixnet
/
utils.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-03-13
|
3KB
|
106 lines
/*
* This file is part of ixnet.library for the Amiga.
* Copyright (C) 1996 Jeff Shepherd
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id:$
*
* $Log: $
*
*/
/* prototypes for btree, database functions */
#ifndef _UTILS_H
#define _UTILS_H
#include "hash.h"
#include "page.h"
#include "btree.h"
#include <db.h>
int _bt_buildret(BTREE_P, DATUM *, DBT *, DBT *);
int _bt_cmp(BTREE_P, char *, index_t);
int _bt_push(BTREE_P, pgno_t);
pgno_t _bt_pop(BTREE_P);
#ifdef DEBUG
void _btdump(BTREE);
#endif
/* seq.c */
int _bt_seqinit(BTREE_P, DBT *, int);
int _bt_seqadvance(BTREE_P, int);
/* delete.c */
int _bt_crsrdel(BTREE_P);
int _bt_delone(BTREE_P, index_t);
/* big.c */
int _bt_getbig(BTREE_P, pgno_t, char **, int *);
int _bt_delindir(BTREE_P, pgno_t);
int _bt_indirect(BTREE_P, DBT *, pgno_t *);
int _bt_markchain(BTREE_P, pgno_t);
/* storage.c */
int _bt_getpage(BTREE_P, pgno_t);
int _bt_getmpage(BTREE_P, pgno_t);
int _bt_getdpage(BTREE_P, pgno_t);
int _bt_pgout(BTHEADER *, char *);
int _bt_pgin(BTHEADER *, char *);
BTHEADER *_bt_allocpg(BTREE_P);
int _bt_write(BTREE_P, BTHEADER *, int);
int _bt_release(BTREE_P, BTHEADER *);
int _bt_wrtmeta(BTREE_P);
/* btree.c */
DB *btree_open(const char *, int, int, const BTREEINFO *);
BTREE bt_open(const char *, int, int , BTREEINFO *);
int bt_get(DB *, DBT *, DBT *, u_long);
int bt_put(DB *, DBT *, DBT *, u_long);
int bt_delete(DB *, DBT *, u_long);
int bt_sync(DB *);
int bt_seq(DB *, DBT *, DBT *, u_long);
int bt_close(DB *);
/* bigkey.c */
int __big_insert(BUFHEAD *, DBT *, DBT *);
int __big_delete(BUFHEAD *, int);
int __find_bigpair(BUFHEAD *, int, char *, int);
u_short __find_last_page(BUFHEAD **);
int __big_return(BUFHEAD *, int, DBT *, int);
int __big_keydata(BUFHEAD *, int, DBT *, DBT *, int);
int __big_split(BUFHEAD *, BUFHEAD *, BUFHEAD *, u_short, u_int, SPLIT_RETURN *);
/* buf.c */
BUFHEAD *__get_buf(u_int, BUFHEAD *, int);
void __buf_init(int);
int __buf_free(int, int);
void __reclaim_buf(BUFHEAD *);
/* log2.c */
int __log2(int);
/* insert.c */
int _bt_insert(BTREE_P, BTITEM *, DBT *, DBT *, int);
int _bt_inserti(BTREE_P, IDATUM *, pgno_t);
int _bt_insertat(BTREE_P, char *, index_t);
/* split.c */
int _bt_split(BTREE_P);
int _bt_reposition(BTREE_P, IDATUM *, pgno_t, pgno_t);
int _bt_isonpage(BTREE_P, IDATUM *, pgno_t);
int _bt_splitroot(BTREE_P);
int _bt_dosplit(BTREE_P, BTHEADER *, BTHEADER *);
/* dynahash.c */
DB *hash_open(const char *, int, int, const HASHINFO *);
int __expand_table(void);
u_int __call_hash(char *, int);
extern inline int isspace(char c) {
return ( ((c) == ' ') || ((c) == '\n') || ((c) == '\r')
|| ((c) == '\t') || ((c) == '\f') );
}
#endif